package com.joseph.validation.config;

import com.joseph.validation.concrete.ArithmeticsImp;
import com.joseph.validation.concrete.AssertNullImp;
import com.joseph.validation.concrete.BooleansImp;
import com.joseph.validation.concrete.CollectionListImp;
import com.joseph.validation.interfaces.StringsInterface;
import com.joseph.validation.concrete.StringsImp;
import com.joseph.validation.concrete.NumbersImp;
import com.joseph.validation.concrete.ObjectsImp;
import com.joseph.validation.interfaces.Arithmetics;
import com.joseph.validation.interfaces.AssertNull;
import com.joseph.validation.interfaces.Booleans;
import com.joseph.validation.interfaces.CollectionList;
import com.joseph.validation.interfaces.Numbers;
import com.joseph.validation.interfaces.ObjectsInterface;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;

/**
 *
 * @author Bradley Joseph(210016299)
 */
@Configurable
public class AppConfig {

    @Bean(name = "val_null")
    public AssertNull isNull() {
        return new AssertNullImp() {};
    }
    
    @Bean(name = "divide")
    public Arithmetics notZero() {
        return new ArithmeticsImp();
    }
    
    @Bean(name = "bool")
    public Booleans checkBool() {
        return new BooleansImp();
    }
    
    @Bean(name = "numerics")
    public Numbers numericValidation() {
        return new NumbersImp();
    }
    
    @Bean(name = "objects")
    public ObjectsInterface checkObject() {
        return new ObjectsImp();
    }
    
    @Bean(name = "collection")
    public CollectionList checkArray() {
        return new CollectionListImp();
    }
    
    @Bean(name = "world")
    public StringsInterface improvedHello() {
        return new StringsImp();
    }
}
